home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / DOCS / ST_GUIDE.PR / PROGRAMS.TXT < prev    next >
Encoding:
Text File  |  1994-02-12  |  2.5 KB  |  67 lines

  1. DESKTOP /x1k1                        ┌────────────────┐
  2.                         │  PROGRAM File  │
  3.                         └────────────────┘
  4. byte#
  5. -----
  6.                 ╓─
  7.                 ║ 0- 1   BRA.S 28 ($601A)
  8.                 ║ 2- 5   TEXT size
  9.                 ║ 6- 9   DATA size
  10.  0-27   HEADER ─╢10-13   Block Storage Segment size
  11.                 ║14-17   SYMBOLIC size
  12.                 ║18-21   0
  13.                 ║22-25   -
  14.                 ║26-27   Relocation flag
  15.                 ╙─
  16.                 ╓─
  17. 28-.. PROGRAM  ─╢ TEXT
  18.                 ║ DATA
  19.                 ╙─
  20.                 ╓─ Each label(for example):
  21.                 ║ 0- 7   Name + 0
  22. ..-.. SYMBOLIC ─╢ 8- 9   Type
  23.                 ║10-13   Value
  24.                 ╙─
  25. ..-.. RELOCATION TABLE
  26.        ╓─
  27.        ║4 bytes = 1st  address to relocate in the TEXT
  28.        ║1 byte  = next address to relocate )relative to the previous address
  29.        ║1 byte  = next address to relocate )relocated
  30.        ║1 byte  = next address to relocate )for distance >254:
  31.        ║1 byte  = next address to relocate )each 1 means +254
  32.       ─╢1 byte  = next address to relocate )
  33.        ║1 byte  = next address to relocate )
  34.        ║1 byte  = next address to relocate )
  35.        ║1 byte  = next address to relocate )
  36.        ║. ....  . ... ....... .. ........
  37.        ║1 byte  = 0   End of table
  38.        ╙─
  39. ────────────────────────────────────────────────────────────────────────────────
  40.                         ┌─────────────────────┐
  41.                         │  PROGRAM in Memory  │
  42.                         └─────────────────────┘
  43.  byte#
  44. -------
  45.                   ╓─
  46.                   ║  0-  3   Low  Transit Program Address = 4(SP)
  47.                   ║  4-  7   High Transit Program Address
  48.                   ║  8- 11   TEXT Address
  49.                   ║ 12- 15   TEXT Length
  50.                   ║ 16- 19   DATA Address
  51.                   ║ 20- 23   DATA Length
  52.                   ║ 24- 27   BSS  Address
  53.   0-255 BASEPAGE ─╢ 28- 31   BSS  Length
  54.                   ║ 32- 35   Disk Transfert Address
  55.                   ║ 36- 39   Parent Program Address
  56.                   ║ 40- 43   -
  57.                   ║ 44- 47   Environment String Address
  58.                   ║ 48-127   -            ╓─
  59.                   ║128-255   Command Line─╢128 Numbers of char. in command line
  60.                   ║                       ║129-255 Parameters+"CR"
  61.                   ╙─                      ╙─
  62.                   ╓─
  63.                   ║ TEXT
  64. 256-... PROGRAM  ─╢ DATA
  65.                   ║ BSS
  66.                   ╙─
  67.